package cn.lx;

/**
 * @author lixin
 * @Classname Context
 * @Description TODO
 * @Date 2019/10/7 下午4:39
 */
public class Context {
    // 抽象策略
    private Strategy strategy = null;

    // 设置具体的策略
    public Context(Strategy _strategy) {
        this.strategy = _strategy;
    }

    public void doAnything() {
        this.strategy.doSomething();
    }

}
